import routeComponentName from '@/config/route-component-name'

const userRouter = [
  {
    path: '/user',
    component: () => import('@/layout/index.vue'),
    name: 'user',
    meta: { title: '客户资料', icon: 'User' },
    redirect: '/user/list',
    children: [
      {
        path: 'new',
        component: () => import('@/views/users/new/index.vue'),
        name: 'newUser',
        meta: {
          title: '新增公司',
          keepAlive: true,
          componentName: routeComponentName.customer.customerCreate,
        },
        hidden: true,
      },
      {
        path: 'list',
        component: () => import('@/views/users/list/index.vue'),
        name: 'userList',
        meta: {
          title: '客户资料',
          icon: 'User',
          keepAlive: true,
          componentName: routeComponentName.customer.customerList,
        },
      },
      {
        path: 'userdetail/:id',
        component: () => import('@/views/users/detail/index.vue'),
        name: 'userDetail',
        meta: {
          title: '客户详情',
          keepAlive: true,
          componentName: routeComponentName.customer.customerDetail,
        },
        hidden: true,
      },
      {
        path: 'userExcelImport',
        component: () => import('@/views/excel/index.vue'),
        name: 'userExcelImport',
        meta: {
          title: '客户资料导入',
          keepAlive: true,
          componentName: routeComponentName.common.import,
        },
        hidden: true,
      },
    ],
  },
]

export default userRouter
